package myAsm;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import myAsm.MyPackageNode;

@Entity
@Table(name="jar_jar")
public class MyJarNode {

	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="JAR_ID")
	private Integer id;
	
	@Column(name="JAR_NAME")
	private String name;
	
	@Column(name="JAR_DATE")
	private String date;
	
	@OneToMany(cascade = CascadeType.ALL)
	public List<MyPackageNode> pkg;

	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public MyJarNode() {	
	}
	
	public MyJarNode(String name,String string) {
		this.name = name;
		this.date = string;
		this.pkg = new ArrayList<MyPackageNode>();
	}


	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}
	
}